package com.boy.controller.admin;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.boy.entity.Log;
import com.boy.service.LogService;
import com.boy.tool.domain.Pos;
import com.boy.tool.annotate.RequirePermissions;
import com.boy.tool.domain.ResultVo;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 前端控制器
 * </p>
 *
 * @author whd
 * @since 2024-05-23
 */
@RestController
@RequestMapping("/log")
@Slf4j
public class LogController {


    @Autowired
    private LogService logService;


    @RequirePermissions({"Log:find"})
    @PostMapping("/find")
    public ResultVo find(@RequestBody Pos pos) {
        IPage<Log> page = logService.findPage(pos, (String) pos.getParam().get("name"));
        return ResultVo.success(page);
    }
}

